package com.orientsec.autotest.project.system.systemSqlconn.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.orientsec.autotest.project.system.systemSqlconn.mapper.SystemSqlconnMapper;
import com.orientsec.autotest.project.system.systemSqlconn.domain.SystemSqlconn;
import com.orientsec.autotest.project.system.systemSqlconn.service.ISystemSqlconnService;
import com.orientsec.autotest.common.utils.text.Convert;

/**
 * sql连接字符串 服务层实现
 * 
 * @author autotest
 * @date 2019-12-18
 */
@Service
public class SystemSqlconnServiceImpl implements ISystemSqlconnService 
{
	@Autowired
	private SystemSqlconnMapper systemSqlconnMapper;

	/**
     * 查询sql连接字符串信息
     * 
     * @param id sql连接字符串ID
     * @return sql连接字符串信息
     */
    @Override
	public SystemSqlconn selectSystemSqlconnById(Integer id)
	{
	    return systemSqlconnMapper.selectSystemSqlconnById(id);
	}
	
	/**
     * 查询sql连接字符串列表
     * 
     * @param systemSqlconn sql连接字符串信息
     * @return sql连接字符串集合
     */
	@Override
	public List<SystemSqlconn> selectSystemSqlconnList(SystemSqlconn systemSqlconn)
	{
	    return systemSqlconnMapper.selectSystemSqlconnList(systemSqlconn);
	}
	
    /**
     * 新增sql连接字符串
     * 
     * @param systemSqlconn sql连接字符串信息
     * @return 结果
     */
	@Override
	public int insertSystemSqlconn(SystemSqlconn systemSqlconn)
	{
	    return systemSqlconnMapper.insertSystemSqlconn(systemSqlconn);
	}
	
	/**
     * 修改sql连接字符串
     * 
     * @param systemSqlconn sql连接字符串信息
     * @return 结果
     */
	@Override
	public int updateSystemSqlconn(SystemSqlconn systemSqlconn)
	{
	    return systemSqlconnMapper.updateSystemSqlconn(systemSqlconn);
	}

	/**
     * 删除sql连接字符串对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteSystemSqlconnByIds(String ids)
	{
		return systemSqlconnMapper.deleteSystemSqlconnByIds(Convert.toStrArray(ids));
	}
	
}
